# ROM Hasher

### Contents

1. General
2. Platform Detection
3. ROM Hashes
4. Supported Databases/Formats

### General

The primary function of this program is to verify and hash ROMs for romhacking.net

- By default the program is configured to summarize and highlight information specific to romhacking.net's ROM/ISO information and related fields

- The specifics of this can be manually configured with a text editor

- Database configuration can be modified within the program. Databases can be added provided they meet requirements detailed in Supported Databases/Formats.

- ROM Hasher includes and is primarily geared toward the No-Intro database

- By default, the program only calculates certain hashes, but provides an option to calculate all possible hashes (all algorithms for each: file, ROM, and system-specific).

(Contents)

### Platform Detection

The platform associated with a ROM is identified by the contents rather than file extension when possible. If zero or more than one candidate platforms are found, the file extension is used to disambiguate. If this method fails to identify one single platform, the user will be prompted to select the platform. The criteria below are used to identify candidate platforms. ROM Hasher does not distinguish between Game Boy and Game Boy Color, Genesis and 32X, or Neo Geo Pocket and Neo Geo Pocket Color.

- NES

- iNES header present (identified by magic number)

- FDS

- FDS header present (identified by magic number)

- SNES

- SMC, SWC, or Pro Fighter external header present (identified by extra $200 bytes), OR
- for reasonably small ROMs, checksum in internal header can be validated

- Genesis

- Internal header present (identified by standard string)

- Game Boy, Game Boy Advance

- Internal header present (identified by valid "Game Boy" logo data)

- Master System, Game Gear

- Internal header present (identified by standard string)

- N64

- Standard value present at beginning of ROM

- DS

- Internal header checksum can be validated)

- Neo Geo Geo Pocket

- Internal header present (identified by standard string)

(Contents)

### ROM Hashes

"ROM Hashes", as opposed to file hashes, are based on raw ROM images, excluding any kind of container, external header, or interleaving. This helps identify certain scenarios such as having the right ROM in the wrong format, having a bad external header, et cetera. Some ROM databases, including No-Intro, use ROM hashes rather than file hashes for this reason.

The list below details how ROM hashes are calculated by ROM hasher. The systems listed below have been tested to some extent with all included No-Intro databases. Note that in most cases, ROM hasher will not detect or exclude overdump.

- NES

- If header is present,

- Header is stripped, and the number of bytes from the beginning of the ROM that is the lesser of the following will be hashed:

- The remainer of the ROM
- The amount of data that is the sum of the specified PRG and CHR size by the external header

- If no header is present, the entire file is hashed

- SNES

- External header is stripped. Remainder is hashed.

- Genesis

- SMD roms are converted to BIN format in memory
- Entire contents hashed

- FDS

- External header is stripped if present
- Remainder is hashed

- N64

- If byte-swapping is detected, it is reversed
- Entire contents hashed

- Others

- For Master System, Game Gear, Game Boy, Game Boy Advance, Nintendo DS, and Neo Geo pocket, the ROMs are usually straight ROM images and the entire file contents are hashed.

(Contents)

### Supported Databases/Formats

Currently, only ClrMamePro DATS are supported. Any ClrMamePro DAT can be used provided that is provides the minimum needed data for ROM Hasher, including file or compatible ROM hashes. For platforms not listed under ROM Hashes, only file hashes are supported.

No-Intro databases for common platforms are included with the program. Additional No-Intro databases for systems that don't have special ROM Hash requirements. TOSEC databases, which use file hashes, should also work.

(Contents)